import { get, post, put, del } from "@utils/http";

/**
 * @白云区相关接口
 */

/**
 * @设备
 */

// 设备分页
export const reqBaiYunDevicePage = (page, limit, params) =>
  post(`/device/baiyun/qu/page/${page}/${limit}`, params);

// 新增/编辑设备
export const reqBaiYunDeviceEdit = (data) => put(`/device/baiyun/qu`, data);

// 删除设备
export const reqBaiYunDeviceRemove = (id) => del(`/device/baiyun/qu/${id}`);

// 新增设备
export const reqBaiYunDeviceAdd = (data) => post(`/device/baiyun/qu/add`, data);

// 自动生成
export const reqautoGenerate = (tenantId) =>
  post(`/device/baiyun/qu/autoGenerate/${tenantId}`);

// 全部同步
export const reqallSync = (tenantId) =>
  post(`/device/baiyun/qu/allSync/${tenantId}`);

/**
 * @监控点
 */

// 设备分页
export const reqBaiYuMonitorPage = (page, limit, params) =>
  post(`/by/monitorUnit/page/${page}/${limit}`, params);

// 批量新增/编辑设备
export const reqBaiYunMonitorEditMul = (data) =>
  post(`/by/monitorUnit/saveBatchMonitorUnit`, data);

// 新增设备
export const reqBaiYunMonitorAdd = (data) =>
  post(`/by/monitorUnit/saveMonitorUnit`, data);

// 自动生成
export const reqautoGenerateByMonitor = (tenantId) =>
  post(`/by/monitorUnit/autoGenerate/${tenantId}`);

// 全部同步
export const reqallSyncByMonitor = (tenantId) =>
  post(`/by/monitorUnit/allSync/${tenantId}`);

// 单个同步
export const reqSyncByMonitor = (id) => post(`/by/monitorUnit/sync/${id}`);

// 单个生成
export const reqGenerateByMonitor = (data) => put(`/by/monitorUnit`, data);

// 新增并同步
export const reqAddByMonitor = (data) => post(`/by/monitorUnit/add`, data);


/**
 * @行政标准库
 */

// 列表
export const reqBaiYunRegionPage = (data) =>
  post(`/baiyun/region/getAll`, data);
